package com.wuxuan.javabase_homework.homework3;

import java.util.ArrayList;
import java.util.List;

/**
 * 店铺类
 */
public class Shop {
    private static int count;
    private int id;
    private People merchant;
    private String shopName;
    private List<Book> books = new ArrayList<>();

    public Shop() {
        this.id = ++count;
    }


    public Shop(People merchant, String shopName) {
        this.id = ++count;
        this.merchant = merchant;
        this.shopName = shopName;
    }

    public Shop(People merchant, String shopName, List<Book> books) {
        this.id = ++count;
        this.merchant = merchant;
        this.books = books;
    }

    public static int getCount() {
        return count;
    }

    public static void setCount(int count) {
        Shop.count = count;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public People getMerchant() {
        return merchant;
    }

    public void setMerchant(People merchant) {
        this.merchant = merchant;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }


    @Override
    public String toString() {
        return "Shop{" +
//                "id=" + id +
//                ", merchant=" + merchant +
                "shopName='" + shopName + '\'' + ", books=" + books + '}';
    }
}
